.TH "various PDU processing routines" 3 "30 Jun 2005" "Version 5.2.1.rc3" "net-snmp" \" -*- nroff -*-
.ad l
.nh
.SH NAME
various PDU processing routines \- 
.SS "Defines"

.in +1c
.ti -1c
.RI "#define \fBBSD4_2\fP"
.br
.ti -1c
.RI "#define \fBNFDBITS\fP   (sizeof(fd_mask) * NBBY)"
.br
.ti -1c
.RI "#define \fBFD_SET\fP(n, p)   ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))"
.br
.ti -1c
.RI "#define \fBFD_CLR\fP(n, p)   ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))"
.br
.ti -1c
.RI "#define \fBFD_ISSET\fP(n, p)   ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))"
.br
.ti -1c
.RI "#define \fBFD_ZERO\fP(p)   memset((p), 0, sizeof(*(p)))"
.br
.in -1c
.SS "Typedefs"

.in +1c
.ti -1c
.RI "typedef long \fBfd_mask\fP"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBnetsnmp_pdu\fP * \fBsnmp_pdu_create\fP (int command)"
.br
.ti -1c
.RI "\fBnetsnmp_variable_list\fP * \fBsnmp_add_null_var\fP (\fBnetsnmp_pdu\fP *pdu, const oid *name, size_t name_length)"
.br
.ti -1c
.RI "int \fBsnmp_clone_var\fP (\fBnetsnmp_variable_list\fP *var, \fBnetsnmp_variable_list\fP *newvar)"
.br
.ti -1c
.RI "int \fBsnmp_clone_mem\fP (void **dstPtr, void *srcPtr, unsigned len)"
.br
.ti -1c
.RI "void \fBsnmp_reset_var_buffers\fP (\fBnetsnmp_variable_list\fP *var)"
.br
.ti -1c
.RI "\fBnetsnmp_variable_list\fP * \fBsnmp_clone_varbind\fP (\fBnetsnmp_variable_list\fP *varlist)"
.br
.ti -1c
.RI "\fBnetsnmp_pdu\fP * \fBsnmp_clone_pdu\fP (\fBnetsnmp_pdu\fP *pdu)"
.br
.ti -1c
.RI "\fBnetsnmp_pdu\fP * \fBsnmp_split_pdu\fP (\fBnetsnmp_pdu\fP *pdu, int skip_count, int copy_count)"
.br
.ti -1c
.RI "\fBnetsnmp_pdu\fP * \fBsnmp_fix_pdu\fP (\fBnetsnmp_pdu\fP *pdu, int command)"
.br
.ti -1c
.RI "unsigned long \fBsnmp_varbind_len\fP (\fBnetsnmp_pdu\fP *pdu)"
.br
.ti -1c
.RI "int \fBsnmp_set_var_objid\fP (\fBnetsnmp_variable_list\fP *vp, const oid *objid, size_t name_length)"
.br
.ti -1c
.RI "int \fBsnmp_set_var_typed_value\fP (\fBnetsnmp_variable_list\fP *newvar, u_char type, const u_char *val_str, size_t val_len)"
.br
.RI "\fIsnmp_set_var_typed_value is used to set data into the netsnmp_variable_list structure. \fP"
.ti -1c
.RI "int \fBcount_varbinds\fP (\fBnetsnmp_variable_list\fP *var_ptr)"
.br
.ti -1c
.RI "int \fBcount_varbinds_of_type\fP (\fBnetsnmp_variable_list\fP *var_ptr, u_char type)"
.br
.ti -1c
.RI "\fBnetsnmp_variable_list\fP * \fBfind_varbind_of_type\fP (\fBnetsnmp_variable_list\fP *var_ptr, u_char type)"
.br
.ti -1c
.RI "int \fBsnmp_set_var_value\fP (\fBnetsnmp_variable_list\fP *newvar, const u_char *val_str, size_t val_len)"
.br
.ti -1c
.RI "void \fBsnmp_replace_var_types\fP (\fBnetsnmp_variable_list\fP *vbl, u_char old_type, u_char new_type)"
.br
.ti -1c
.RI "void \fBsnmp_reset_var_types\fP (\fBnetsnmp_variable_list\fP *vbl, u_char new_type)"
.br
.ti -1c
.RI "int \fBsnmp_synch_response_cb\fP (\fBnetsnmp_session\fP *ss, \fBnetsnmp_pdu\fP *pdu, \fBnetsnmp_pdu\fP **response, snmp_callback pcb)"
.br
.ti -1c
.RI "int \fBsnmp_synch_response\fP (\fBnetsnmp_session\fP *ss, \fBnetsnmp_pdu\fP *pdu, \fBnetsnmp_pdu\fP **response)"
.br
.ti -1c
.RI "int \fBsnmp_sess_synch_response\fP (void *sessp, \fBnetsnmp_pdu\fP *pdu, \fBnetsnmp_pdu\fP **response)"
.br
.ti -1c
.RI "const char * \fBsnmp_errstring\fP (int errstat)"
.br
.in -1c
.SS "Variables"

.in +1c
.ti -1c
.RI "const char * \fBerror_string\fP [19]"
.br
.in -1c
.SH "Function Documentation"
.PP 
.SS "int snmp_set_var_typed_value (\fBnetsnmp_variable_list\fP * newvar, u_char type, const u_char * val_str, size_t val_len)"
.PP
snmp_set_var_typed_value is used to set data into the netsnmp_variable_list structure. 
.PP
Used to return data to the snmp request via the netsnmp_request_info structure's requestvb pointer.
.PP
\fBParameters:\fP
.RS 4
\fInewvar\fP the structure gets populated with the given data, type, val_str, and val_len. 
.br
\fItype\fP is the asn data type to be copied 
.br
\fIval_str\fP is a buffer containing the value to be copied into the newvar structure. 
.br
\fIval_len\fP the length of val_str
.RE
.PP
\fBReturns:\fP
.RS 4
returns 0 on success and 1 on a malloc error 
.RE
.PP

.PP
\fBExamples: \fP
.in +1c
\fBdelayed_instance.c\fP.
.PP
Definition at line 671 of file snmp_client.c.
.PP
References variable_list::type.
.PP
Referenced by check_getnext_results(), handle_pdu(), netsnmp_check_getnext_reply(), netsnmp_old_api_helper(), netsnmp_table_build_result(), and netsnmp_table_data_build_result().
.SH "Variable Documentation"
.PP 
.SS "const char* error_string[19]"
.PP
\fBInitial value:\fP
.PP
.nf
 {
    '(noError) No Error',
    '(tooBig) Response message would have been too large.',
    '(noSuchName) There is no such variable name in this MIB.',
    '(badValue) The value given has the wrong type or length.',
    '(readOnly) The two parties used do not have access to use the specified SNMP PDU.',
    '(genError) A general failure occured',
    'noAccess',
    'wrongType (The set datatype does not match the data type the agent expects)',
    'wrongLength (The set value has an illegal length from what the agent expects)',
    'wrongEncoding',
    'wrongValue (The set value is illegal or unsupported in some way)',
    'noCreation (That table does not support row creation or that object can not ever be created)',
    'inconsistentValue (The set value is illegal or unsupported in some way)',
    'resourceUnavailable (This is likely a out-of-memory failure within the agent)',
    'commitFailed',
    'undoFailed',
    'authorizationError (access denied to that object)',
    'notWritable (That object does not support modification)',
    'inconsistentName (That object can not currently be created)'
}
.fi
.PP
Definition at line 927 of file snmp_client.c.
